﻿// -----------------------------------------------------------------------
// Copyright (c) Microsoft Corporation.  All rights reserved.
// -----------------------------------------------------------------------
using System;
using System.Collections.Generic;
using System.ComponentModel.Composition;
using System.Linq;
using System.ComponentModel.Composition.AttributedModel;

namespace System.ComponentModel.Composition.Factories
{
    internal static partial class PartDefinitionFactory
    {
        public static AttributedComposablePartDefinition CreateAttributed(Type type)
        {
            return new AttributedComposablePartDefinition(type);
        }

        public static ComposablePartDefinition Create()
        {
            return new NoOverridesComposablePartDefinition();
        }

        public static ComposablePartDefinition Create(IDictionary<string, object> metadata,
                                                      Func<ComposablePart> partCreator,
                                                      IEnumerable<ImportDefinition> importDefinitions,
                                                      IEnumerable<ExportDefinition> exportDefinitions)
        {
            return new DerivedComposablePartDefinition(metadata, partCreator, importDefinitions, exportDefinitions);
        }
    }
}
